package doyouknow.group.CnAndZhb.error;

/**
 * Created by a10.13.6 on 2019/4/23.
 */
public enum  EnumBusinessError implements CommonError{

    /**
     * 通用错误码枚举
     */

    //通用错误类型
    PARAMETER_VALIDATION_ERROR(10001,"参数不合法"),
    UNKONWN_ERROR(10002,"未知错误") ,

    //20000开头的为用户相关信息错误的错误代码
    User_Not_Exist(20001,"用户不存在"),
    USER_LOG_IN_FAIL(20002,"账号号或密码不正确"),
    USER_AUTHENTICATION_FAIL(20003,"用户未登录") ,
    USER_Not_Exist(20004,"管理员不存在") ,
    USER_Exist(20005,"该手机已经绑定管理员") ,
    USER_NOAUTH_Exist(20006,"你没有该权限") ,
    USER_Token_NOAUTH(20007,"权限已经过期请重新登录") ,

    //30000开头的为用户相关信息错误的错误代码
    GATEWAY_Exist(30001,"网关已经存在,激活网关失败"),
    activate__Exist(30002,"网关激活失败"),
    GATEWAY_ACTIVATE__FAIL(30003,"网关激活失败"),
    GATEWAY_ADD__FAIL(30004,"网关新增失败"),
    GATEWAY_UUID_Exist(30005,"该产品ID已经存在"),
    GATEWAY_NOT_Exist(30006,"网关不存在"),
    GATEWAY_NOT_BYHOTEL_Exist(30007,"该酒店没有绑定该网关"),
    GATEWAY__EBIND_ACTION_ERROR(30008,"网关绑定失败"),
    GATEWAY_BIND_Exist(30009,"该网关已被其他酒店或其他房间绑定"),
    GATEWAY_PARAM_(30010,"该网关已被其他酒店或其他房间绑定"),
    GATEWAY_PARAM_HONGWAI(30011,"没有绑定任何红外"),
    GATEWAY_TEMP_CREATE_ERROR(30012,"网关模板生成失败"),
    GATEWAY_TEMP_CLONE_ERROR(30015,"网关模板克隆失败"),
    DEVICE_DOUBLE_BIND_POINT_Exist(30016,"双控绑定的节点重复"),
    DEVICE_DOUBLE_BIND_ERROR(30017,"双控绑定设置失败"),
    DEVICE_DOUBLE_BIND_NOT_EXITS(30018,"双控绑定不存在"),
    DEVICE_DOUBLE_UNBIND_ERROR(30019,"双控绑定解绑失败"),
    DEVICE_DEFAULT_POWER_SET_ERROR(30020,"上电配置设置失败"),
    DEVICE_PONIT_MODE_SET_ERROR(30021,"节点模式设置失败"),

    //40000开头的为酒店相关信息错误的错误代码
    Hotel_Action_ERROR(40001,"酒店信息保存失败"),
    Hotel_Info_Exist(40002,"该酒店已经添加"),
    Hotel_NO_Exist(40003,"酒店不存在"),
    Hotel_ROOM_GW_Exist(40004,"该房间已经绑定过网关请先删除"),
    Hotel_ROOM_NOTE_BIND_Exist(40005,"该酒店没有绑定该网关"),
    Hotel_HOTEL_NOT_Exist(40006,"此账号还未添加酒店"),

    //50000开头的为语音系统相关信息错误的错误代码
    VOICE_MAC_Ex_ERROR(50001,"该网关已经绑定语音系统"),
    VOICE_MAC_NO_ERROR(50002,"暂未查询到"),
    VOICE_Exist(50003,"该语音已经绑定到其他房间"),

    CH_Exist(60001,"该机顶盒已有相同频道"),
    CH_Error(60002,"机顶盒"),
    CH_GET_Error(60003,"该机顶盒还未设置"),
    HOTEL_PLAN_Error(70003,"酒店方案提交失败"),

    //70000开头为cn另外加的


    ;

    private int errCode;
    private String errMsg;

    EnumBusinessError(int errorCode, String errorMsg) {
        this.errCode = errorCode;
        this.errMsg = errorMsg;
    }


    @Override
    public int getErrorCode() {
        return this.errCode;
    }

    @Override
    public String getErrorMsg() {
        return this.errMsg;
    }

    @Override
    public EnumBusinessError setErrorMsg(String errorMsg) {

        this.errMsg = errorMsg;
        return  this;

    }
}
